﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>在线投票 - {config.webname}</title>
<link type="text/css" rel="stylesheet" href="{config.webpath}css/validate.css" />
<link type="text/css" rel="stylesheet" href="{config.webpath}scripts/artdialog/ui-dialog.css" />
<link href="<%templateskin="EducationBureauRed"%>/css/index1.css" rel="stylesheet" type="text/css" />
<link href="<%templateskin="EducationBureauRed"%>/css/main.css" rel="stylesheet" type="text/css" />
<link href="<%templateskin="EducationBureauRed"%>/css/main1.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="{config.webpath}scripts/jquery/jquery-1.11.2.min.js"></script>
    <script type="text/javascript">
        var jq=jQuery.noConflict();
    </script>
    <script type="text/javascript" src="<%templateskin="EducationBureauRed"%>/js/chao.js"></script>
<script type="text/javascript" src="{config.webpath}scripts/jquery/jquery.form.min.js"></script>
<script type="text/javascript" src="{config.webpath}scripts/jquery/Validform_v5.3.2_min.js"></script>
<script type="text/javascript" src="{config.webpath}scripts/artdialog/dialog-plus-min.js"></script>
<script type="text/javascript" src="<%templateskin="EducationBureauRed"%>/js/common.js"></script>
<script type="text/javascript">
    jq(function () {
       
        //初始化表单
        AjaxInitFormjq('#form1', '#btnSubmit', 1, '#turlvote');
    });
</script>
</head>

<body>
<!--头部模版-->
<%template skin="EducationBureauRed" src="header.html"%>
    <div class="bodyyangshi">
<div id="main" style="background:white;margin-top:-5px;padding-top:10px;font-size:16px;color:#1E50A0;">
    <div style="height:17px;float:left;overflow:hidden;margin:10px;"><img src="<%templateskin="EducationBureauRed"%>/image/vote_bg.gif" /style="height:150px;width:16px;"></div>
<div style="height:42px;"><h1 style="padding-top:9px;color: #f66c09;">{model.title}</h1></div>
<hr />
<div style="margin-left:25px;">
<p>投票内容：{model.content}  </p>


<form id="form1" name="form1" url="{config.webpath}plugins/vote/ajax.ashx?action=add&vote_id={model.id}">
  <div class="form_box">
    <!--投票选项-->
    <%if(model.options!=null)%>
      <%foreach(EazyCMS.Web.Plugin.Vote.Model.vote_option modelt in model.options)%>
      <dl>
        <dt style="display:inline">
          <%if(model.is_multi==1)%>
            <input type="checkbox" name="option_id" value="{modelt.id}" />
          <%else%>
             <input type="radio" name="option_id" value="{modelt.id}" />
          <%/if%>
        </dt>
        <dd style="display:inline;color: #f66c09;">
          <%csharp%>
          string percent="0";
          if(model.vote_count>0){
            percent=(double.Parse(modelt.vote_num.ToString())/double.Parse(model.vote_count.ToString())*100).ToString("0");
          }
          <%/csharp%>
          {modelt.title} （已有 {modelt.vote_num} 票，约 {percent}%）
        </dd>
      </dl>
      <%/foreach%>
    <%/if%>
    <!--/投票选项-->

    <dl>
      <dt style="color: #f66c09;">投票理由：</dt>
      <dd><textarea id="remark" name="remark" class="input txt" datatype="*" sucmsg=" " style="width:350px;height:80px;"></textarea></dd>
    </dl>
    <dl>
      <dt style="color: #f66c09;">验证码：</dt>
      <dd>
        <input id="code" name="code" type="text" class="input small" datatype="*" sucmsg=" " />
        <a href="javascript:;" onclick="ToggleCode(this, '{config.webpath}tools/verify_code.ashx');return false;"><img src="{config.webpath}tools/verify_code.ashx" width="80" height="22" align="absmiddle" /> 看不清楚？</a>
        <span class="Validform_checktip"></span>
      </dd>
    </dl>
    <dl>
      <dt></dt>
      <dd>
        <input id="btnSubmit" name="btnSubmit" type="submit" value="确认投票" class="btn_submit" />
        <input id="turlvote" type="hidden" value="<%linkurl("vote_show",{model.id})%>" /><!--存储提交成功后跳转的URL-->
      </dd>
    </dl>

  </div>
</form>
</div>
</div>
    <!--Footer-->
    <%template skin="EducationBureauRed" src="footer.html"%>
    <!--/Footer-->
        </div>
</body>
</html>
